<%--
  Created by IntelliJ IDEA.
  User: 15c
  Date: 2017/6/11
  Time: 20:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js">
    </script>
    <script>
        $(document).ready(function () {
            $("button").click(function () {
                $.ajax({
                    url: "http://localhost:8081/findStudent", success: function (result) {
                        $("#div1").html("学号：" + result.data.sno +
                                        " 姓名：" + result.data.sname +
                                        " 性别：" + result.data.ssex);
                    }
                });
            });
        });
    </script>
</head>
<body>
    <%session.setAttribute("aaa","bbb");
%>
<div id="div1"><h2>获取学生信息</h2></div>
${sessionScope.get("aaa")}
<button>获取内容</button>